using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Features
{
    /// <summary>
    /// <para>Repair Geometry</para>
    /// <para>Inspects each  feature in a feature class for problems with its geometry.  Upon discovery of a problem, a fix will be applied, and a one-line description will identify the feature, as well as the geometry problem that was fixed.</para>
    /// <para>检查要素类中的每个要素是否存在几何问题。 发现问题后，将应用修复程序，单行描述将标识特征以及已修复的几何问题。</para>
    /// </summary>    
    [DisplayName("Repair Geometry")]
    public class RepairGeometry : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public RepairGeometry()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The feature class or layer to be processed.</para>
        /// <para>要处理的要素类或图层。</para>
        /// </param>
        public RepairGeometry(object _in_features)
        {
            this._in_features = _in_features;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Repair Geometry";

        public override string CallName => "management.RepairGeometry";

        public override List<string> AcceptEnvironments => ["extent", "workspace"];

        public override object[] ParameterInfo => [_in_features, _delete_null.GetGPValue(), _out_feature_class, _validation_method.GetGPValue()];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The feature class or layer to be processed.</para>
        /// <para>要处理的要素类或图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Delete Features with Null Geometry</para>
        /// <para><xdoc>
        ///   <para>Specifies whether features with null geometries will be deleted.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Features with null geometry will be deleted from the input. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Features with null geometry will not be deleted from the input.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否删除具有空几何的要素。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 具有空几何的特征将从输入中删除。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 不会从输入中移除具有空几何的要素。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Delete Features with Null Geometry")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _delete_null_value _delete_null { get; set; } = _delete_null_value._true;

        public enum _delete_null_value
        {
            /// <summary>
            /// <para>DELETE_NULL</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DELETE_NULL")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>KEEP_NULL</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("KEEP_NULL")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Repaired Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Repaired Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        /// <summary>
        /// <para>Validation Method</para>
        /// <para><xdoc>
        ///   <para>Specifies which geometry validation method will be used to identify geometry problems.</para>
        ///   <bulletList>
        ///     <bullet_item>Esri—The Esri geometry validation method will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>OGC—The OGC geometry validation method will be used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将用于识别几何问题的几何验证方法。</para>
        ///   <bulletList>
        ///     <bullet_item>Esri—将使用 Esri 几何验证方法。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>OGC—将使用 OGC 几何验证方法。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Validation Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _validation_method_value _validation_method { get; set; } = _validation_method_value._ESRI;

        public enum _validation_method_value
        {
            /// <summary>
            /// <para>Esri</para>
            /// <para>Esri—The Esri geometry validation method will be used. This is the default.</para>
            /// <para>Esri—将使用 Esri 几何验证方法。这是默认设置。</para>
            /// </summary>
            [Description("Esri")]
            [GPEnumValue("ESRI")]
            _ESRI,

            /// <summary>
            /// <para>OGC</para>
            /// <para>OGC—The OGC geometry validation method will be used.</para>
            /// <para>OGC—将使用 OGC 几何验证方法。</para>
            /// </summary>
            [Description("OGC")]
            [GPEnumValue("OGC")]
            _OGC,

        }

        public RepairGeometry SetEnv(object extent = null, object workspace = null)
        {
            base.SetEnv(extent: extent, workspace: workspace);
            return this;
        }

    }

}